(global.webpackJsonp = global.webpackJsonp || []).push([ [ "xg_o2o/getcoupon/getcoupon" ], {
    "140b": function(n, t, o) {
        "use strict";
        o.r(t);
        var e = o("7ba5"), i = o.n(e);
        for (var c in e) "default" !== c && function(n) {
            o.d(t, n, function() {
                return e[n];
            });
        }(c);
        t.default = i.a;
    },
    "38d8": function(n, t, o) {
        "use strict";
        (function(n) {
            function t(n) {
                return n && n.__esModule ? n : {
                    default: n
                };
            }
            o("4e1e"), t(o("66fd")), n(t(o("9c94")).default);
        }).call(this, o("543d").createPage);
    },
    5879: function(n, t, o) {
        "use strict";
        var e = o("cfad");
        o.n(e).a;
    },
    "7ba5": function(n, t, o) {
        "use strict";
        (function(n) {
            Object.defineProperty(t, "__esModule", {
                value: !0
            }), t.default = void 0;
            var o = {
                data: function() {
                    return {
                        bgColor: "",
                        textColor: "",
                        graceFullLoading: !0,
                        currentIndex: 0,
                        mainHeight: 0,
                        coupons: [ [] ],
                        page: [ 1 ],
                        pageMore: [ 0 ],
                        clickNum: [ 0 ],
                        loadingTypes: [ 0 ],
                        showBack: !1,
                        itemid: 0
                    };
                },
                onLoad: function(t) {
                    var o = getCurrentPages();
                    this.showBack = o.length > 1, this.itemid = t.item > 0 ? t.item : 0;
                    var e = this.$systemInfo.info();
                    this.mainHeight = e.windowHeight - e.statusBarHeight - 44 - e.iPhoneXBottomHeightPx - n.upx2px(150);
                },
                onShow: function() {
                    this.getCoupon("getcoupon", 1);
                },
                methods: {
                    formSubmit: function(t) {
                        var o = this;
                        if (this.couponcode = t.detail.value.couponcode, this.couponBTn = !0, this.couponcode) {
                            n.showLoading({
                                title: "兑换中",
                                mask: !0
                            });
                            var e = this.$xSign.sign("v4coupon");
                            this.$xRequest.request({
                                url: "entry/wxapp/v4coupon",
                                data: {
                                    xgsign: e,
                                    code: this.couponcode,
                                    op: "getcode"
                                },
                                success: function(t) {
                                    n.hideLoading(), n.showModal({
                                        title: "提示",
                                        content: t.data.message,
                                        success: function(n) {
                                            n.confirm ? o.getCoupon("getcoupon", 1) : n.cancel && console.log("用户点击取消");
                                        }
                                    });
                                },
                                fail: function(t) {
                                    n.showToast({
                                        title: t.data.message,
                                        icon: "none",
                                        mask: !0
                                    }), o.couponcode = "", o.couponBTn = !1;
                                }
                            });
                        } else n.showToast({
                            title: "请输入兑换码",
                            duration: 1200,
                            icon: "none",
                            mask: !0
                        }), this.couponBTn = !1;
                    },
                    toCoupon: function() {
                        n.navigateTo({
                            url: "../coupon/coupon"
                        });
                    },
                    useIt: function(t) {
                        var o = t.currentTarget.id;
                        n.$emit("selectCoupon", {
                            coupon: o
                        }), n.navigateBack({
                            delta: 1
                        });
                    },
                    scrollendUser: function(n) {},
                    getCoupon: function(t, o) {
                        var e = this;
                        if (1 == this.pageMore[0]) return 1 == o ? this.graceFullLoading = !1 : n.hideLoading(), 
                        !1;
                        1 == o ? this.graceFullLoading = !0 : n.showLoading({
                            title: "数据加载中"
                        });
                        var i = this.$xSign.sign("v4coupon");
                        this.$xRequest.request({
                            url: "entry/wxapp/v4coupon",
                            data: {
                                page: this.page[0],
                                xgsign: i,
                                op: t,
                                item: this.itemid
                            },
                            success: function(t) {
                                var o = JSON.parse(e.$Decrypt(t.data.data));
                                e.bgColor = o.bgColor, e.textColor = o.textColor, 0 == t.data.errno && (e.graceFullLoading = !1, 
                                n.hideLoading(), 0 == o.info && o.itemlist && (e.coupons[0] = o.itemlist));
                            }
                        });
                    }
                }
            };
            t.default = o;
        }).call(this, o("543d").default);
    },
    "9c94": function(n, t, o) {
        "use strict";
        o.r(t);
        var e = o("c298"), i = o("140b");
        for (var c in i) "default" !== c && function(n) {
            o.d(t, n, function() {
                return i[n];
            });
        }(c);
        o("5879");
        var u = o("f0c5"), a = Object(u.a)(i.default, e.b, e.c, !1, null, null, null, !1, e.a, void 0);
        t.default = a.exports;
    },
    c298: function(n, t, o) {
        "use strict";
        o.d(t, "b", function() {
            return i;
        }), o.d(t, "c", function() {
            return c;
        }), o.d(t, "a", function() {
            return e;
        });
        var e = {
            gracePage: function() {
                return o.e("graceUI/components/gracePage").then(o.bind(null, "1915"));
            },
            graceFullLoading: function() {
                return o.e("graceUI/components/graceFullLoading").then(o.bind(null, "7669"));
            },
            graceEmptyNew: function() {
                return o.e("graceUI/components/graceEmptyNew").then(o.bind(null, "fb2f"));
            },
            graceCoupons: function() {
                return o.e("graceUI/components/graceCoupons").then(o.bind(null, "6be9"));
            }
        }, i = function() {
            this.$createElement, this._self._c;
        }, c = [];
    },
    cfad: function(n, t, o) {}
}, [ [ "38d8", "common/runtime", "common/vendor" ] ] ]);